home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 127 / PC Guia 127.iso / Software / Utils / GParted Live CD / Bin / gparted-livecd-0.2.2.iso / fake / needwrite / etc / rc.d / init.d / mountkernfs < prev    next >
Encoding:
Text File  |  2006-01-27  |  670 b   |  37 lines

  1. #!/bin/sh
  2. # Begin $rc_base/init.d/mountkernfs
  3.  
  4. # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
  5.  
  6. . /etc/sysconfig/rc
  7. . $rc_functions
  8.  
  9. case "$1" in
  10.     start)
  11.         echo -n -e '\E[32mMounting kernel file systems:'
  12.                 echo ""
  13.         if [ ! -e /proc/mounts ]; then
  14.             echo -n " /proc"
  15.             mount -n /proc || failed=1
  16.         fi
  17.  
  18.         # This should be mounted on a 2.6 kernel.
  19.         if grep -q '[[:space:]]sysfs' /proc/filesystems; then
  20.             if [ -d /sys -a ! -d /sys/block ]; then
  21.                 echo -n " /sys"
  22.                 mount -n /sys || failed=1
  23.             fi
  24.         fi
  25.  
  26.         echo
  27.         (exit $failed)
  28.         #evaluate_retval
  29.         ;;
  30.     *)
  31.         echo "Usage: $0 {start}"
  32.         exit 1
  33.         ;;
  34. esac
  35.  
  36. # End $rc_base/init.d/mountkernfs
  37.